package com.imooc.mall.service;

import com.imooc.mall.form.CartAddForm;
import com.imooc.mall.form.CartUpdateForm;
import com.imooc.mall.pojo.Cart;
import com.imooc.mall.vo.CartVo;
import com.imooc.mall.vo.ResponseVO;

import java.util.List;

/**
 * @author: bizy
 * @date: 2020/07/19 18:02
 */
public interface ICartService {

    ResponseVO<CartVo> add(Integer uid,CartAddForm form);

    ResponseVO<CartVo> list(Integer uid);

    ResponseVO<CartVo> update(Integer uid, Integer productId, CartUpdateForm form);

    ResponseVO<CartVo> delete(Integer uid, Integer productId);

    ResponseVO<CartVo> selectAll(Integer uid);

    ResponseVO<CartVo> unSelectAll(Integer uid);

    ResponseVO<Integer> sum(Integer uid);

    List<Cart> listForCart(Integer uid);
}
